package com.ken.spring.factroybean;

import com.ken.spring.Car;

import java.util.HashMap;
import java.util.Map;

public class StaticCarFactory {
    private static Map<String, Car> map = new HashMap<>();

    static {
        map.put("Audi", new Car("Audi", 300000));
        map.put("Baoma", new Car("Baoma", 400000));

    }

    private static Car getCar(String name, int i) {
        System.out.println(i);
        return map.get(name);
    }
}
